﻿using System;
using System.Collections.Generic;
using System.Text;

namespace Model
{
    public partial class Diagnosis
    {
        public List<DiagnosisDrugs> DiagnosisDrugs { get; set; }

        public DiagnosisUseBase DiagnosisUserBase { get; set; }

        #region RenderList

        public string RenderList_Name
        {
            get
            {
                if (this.DiagnosisUserBase != null)
                {
                    return this.DiagnosisUserBase.Name;
                }
                return null;
            }
        }

        public string RenderList_Telephone
        {
            get
            {
                if (this.DiagnosisUserBase != null)
                {
                    return this.DiagnosisUserBase.Mobile;
                }
                return null;
            }
        }

        public string RenderList_Sex
        {
            get
            {
                if (this.DiagnosisUserBase != null)
                {
                    return this.DiagnosisUserBase.UserSex ? "男" : "女";
                }
                return "-";
            }
        }

        public string RenderList_Status
        {
            get
            {
                switch (this.Status)
                {
                    case -1:
                        return "已删除";
                    case 1:
                        return "正常";
                    case 2:
                        return "已结帐";
                    default:
                        return "-";
                }
            }
        }

        #endregion

    }
}
